package nancal.mp.db.mongo.entity.dev

import nancal.mp.db.mongo.JenkinsJobStatusEnum
import nbcp.base.db.IdCodeName
import nbcp.base.db.annotation.Cn
import nbcp.base.db.annotation.DbEntityGroup
import nbcp.base.model.BaseMarkEntity
import org.springframework.data.mongodb.core.mapping.Document


data class DeployItem(
    var gitData: GitData? = null,
    @Cn("git分支") var gitBranch: String = "",
    @Cn("构建文件夹") var buildFolder: String = "",
    var deployLog: JenkinsLog? = null
)

@Document
@DbEntityGroup("dev")
@Cn("发布单")
open class DeploySheet : BaseMarkEntity() {
    var name = ""
    var remark = ""
    var productLine = IdCodeName()
    var status = JenkinsJobStatusEnum.None
    var items = mutableListOf<DeployItem>();
}